CC = gcc
PP = g++

CFLAGS = -g -I ..

ALL = test01c test01p test02c test02p test03c test03p test04c test04p test05c test05p test06c test06p test07c test07p test08c test08p \
	test09c test09p test10c test10p test11c test11p test12c test12p test13c test13p test14c test14p test15c test15p test16c test16p \
	test17c test17p	test18c test18p	test19c test19p	test20c test20p	test21c test21p	test22c test22p	test23c test23p	test24c test24p \
	test25c test25p	test26c test26p	test27c test27p	test28c test28p	test29c test29p	test30c test30p	test31c test31p	test32c test32p \
	test33c test33p	test34c test34p	test35c test35p	test36c test36p	test37c test37p	test38c test38p	test39c test39p	test40c test40p \
	test41c test41p	test42c test42p	test43c test43p

all: $(ALL)

test%c: test%c.o
	$(CC) $(CFLAGS) -o $@ $< ../liberation.o ../jerasure.o ../galois.o ../reed_sol.o ../cauchy.o

test%p: test%p.o
	$(PP) $(CFLAGS) -o $@ $< ../*-2.o
	
.cpp.o:
	$(PP) $(CFLAGS) -c $*.cpp

.c.o:
	$(CC) $(CFLAGS) -c $*.c

clean:
	rm *.o $(ALL)
